unit Checkers.Console;

interface

uses
  SysUtils,
  GLscene,
  GLWin32Viewer,
  GLBitmapFont,
  GLConsole;

procedure InitConsole(const AScene: TGLScene; const AViewer: TGLSceneViewer; const AFont: TGLCustomBitmapFont);
function Console: TGLConsole;

implementation

var
  vConsole: TGLConsole;

procedure InitConsole(const AScene: TGLScene; const AViewer: TGLSceneViewer; const AFont: TGLCustomBitmapFont);
begin
  if vConsole = nil then
  begin
    vConsole := TGLConsole.CreateAsChild(AScene.Objects);
    vConsole.SceneViewer := AViewer;
    vConsole.Font := AFont;
  end;
end;

function Console: TGLConsole;
begin
  Result := vConsole;
end;

end.
